//go:generate swag init

package main

import (
	"server/core"
	"server/flag"
	"server/global"
	"server/initialize"
)

// @title                       Gin-blog Swagger API接口文档
// @version                     v2.7.4
// @description                 使用gin+vue进行极速开发的博客系统
// @securityDefinitions.apikey  ApiKeyAuth
// @in                          header
// @name                        x-token
// @BasePath                    /
func main() {
	global.Config = core.InitConfig("config.dev.yaml")
	global.Log = core.InitLogger()
	initialize.OtherInit()
	global.DB = initialize.InitGorm()
	global.Redis = initialize.InitRedis()
	global.ESClient = initialize.InitEs()
	//
	defer global.Redis.Close()
	flag.InitFlag()
	initialize.InitCron()

	core.RunServer()
}
